Dragonfly fixes#5116
Open
chitao1234 wants to merge 9 commits into
Open
Conversation
Fix DragonFly type aliases and struct layouts to match current headers, including regex offsets, ifaddrs, pthread barriers, process sizing fields, and mcontext alignment.
Collaborator
|
Some changes occurred in a NetBSD-like module cc @semarie |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improve DragonFly BSD support by fixing existing ABI definitions, fix typo'd constant names, fix constant values, moving BSD constants that are not actually generic down into target modules, and adding missing DragonFly constants and libc declarations.
This also expands
libc-testcoverage for DragonFly and makes the tests handle older DragonFly headers with test-only version skips. The public libc API remains version-independent for DragonFly.Sources
Primary API references are DragonFly BSD 6.4 release headers, using tag
v6.4.0(commitaf5fb9a9e56f90cf51e48514d1874be61e9364e6). The same definitions and test behavior were cross-checked against DragonFly 6.2, 6.0, and 5.8 where older headers differ or omit newer symbols.ABI/type definitions:
segsz_t: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/sys/sys/types.hif_msghdrand interface flags: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/sys/net/if.hifaddrs.ifa_addrflags: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/include/ifaddrs.hkinfo_cputime: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/sys/sys/kinfo.hmcontext_t: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/sys/cpu/x86_64/include/ucontext.hregoff_t: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/lib/libc/tre-regex/regex.hConstants and functions:
posix_fadviseconstants: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/sys/sys/fcntl.hgetrandomconstants: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/sys/sys/random.hgetnameinfoconstants: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/include/netdb.hfdatasyncanddup3: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/include/unistd.hdlvsym: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/include/dlfcn.hreallocarrayandqsort_r: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/include/stdlib.hftok: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/af5fb9a9e56f90cf51e48514d1874be61e9364e6/sys/sys/ipc.hChecklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI
Tested on DragonFly 5.8.3, 6.0.1, 6.2.2, 6.4.2 with self-built Rust/Cargo 1.95.0, Rust 1.95.0 on DragonFly 5.8.3 needs patches.
There is actually a
KERN_MAXID, but the same constant is also present and non-deprecated on both nto and apple.@rustbot label +stable-nominated